<?php
return array(
	'behaviors' => array(
		'stateHandle' => array(
			'class' => 'ModelState',
			'handleField' => 'status',
			'configName' => 'status.worker.audit2',
			'configReader' => Yii::app()->config,
			'initState' => 'ST_NONE',
		),
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'provider_id',
			),
		),
		'uidResolver' => array(
			'class' => 'coms.behaviors.AutoIdResolve',
			'uid' => 'provider_id'
		),
	),
	'attributeLabels' => array(
		'category_id' => '商品分类',
		'provider_id' => '供应商',
		'provider.worker_name' => '供应商',
		'status' => '状态'
		
	),
	'rules' => array(
		array('category_id, provider_id', 'required'),
	),
	'relations' => array(
		'category' => array(ActiveRecord::BELONGS_TO, 'GoodsCategory','category_id'),
		'provider' => array(ActiveRecord::BELONGS_TO, 'WorkerAccount','provider_id'),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);